package com.platform.framework.serviceimpl.alipay;

import org.springframework.stereotype.Service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.platform.framework.dao.alipay.AlipayBusinessInfoMybatisDao;
import com.platform.framework.entity.alipay.AlipayBusinessInfo;
import com.platform.framework.serviceinf.alipay.AlipayBusinessInfoService;

@Service("alipayBusinessInfoService")
public class AlipayBusinessInfoServiceImpl implements AlipayBusinessInfoService {

	@Autowired
	private AlipayBusinessInfoMybatisDao alipayBusinessInfoMybatisDao;

	/*
	* 根据id查询商户信息和登录名
	*/
	@Override
	public AlipayBusinessInfo getBusinessInfoById(String id){
		return alipayBusinessInfoMybatisDao.getBusinessInfoById(id);
	}
	/*
	* 查询商户信息和登录名列表
	*/
	@Override
	public List<AlipayBusinessInfo> queryAlipayBusinessList(){
		return alipayBusinessInfoMybatisDao.queryAlipayBusinessList();
	}

	@Override
	public AlipayBusinessInfo getInfoByLoginName(String loginName) {
		return alipayBusinessInfoMybatisDao.getInfoByLoginName(loginName).get(0);
	}

	//根据订单号查询支付宝公钥
	@Override
	public String getPKByOutTradeNo( String outTradeNo){
		return alipayBusinessInfoMybatisDao.getPKByOutTradeNo(outTradeNo);
	}
}

